package com.qf.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qf.entity.TlCar;
import com.qf.entity.TlHotelOrder;
import com.qf.mapper.AdminCarMapper;
import com.qf.service.AdminCarService;
import com.qf.utils.ResultMsg;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdminCarServiceImpl extends ServiceImpl<AdminCarMapper, TlCar> implements AdminCarService {
    @Override
    public ResultMsg findAllCar(int page,int limit) {
        Page<TlCar> carPage = new Page<>(page, limit);
        Page<TlCar> page1 = super.page(carPage);
        return ResultMsg.SUCCESS(page1);

    }

    @Override
    public ResultMsg findOne(Integer cid) {
        TlCar byId = super.getById(cid);
        return ResultMsg.SUCCESS(byId);
    }


}
